﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<%@ include file="/include/include.jsp" %>
</head>

<body>
	
	<%@ include file="/include/header.jsp" %>

	<%@ include file="/include/menu.jsp" %>
	
			
	<div id="mainContent">
		<h2><a href="${ctx}/${menu.url}">${menu.description}</a>&nbsp;-&nbsp;<a href="${ctx}/${empty currViewBarSubMenu_ ? submenu.url : currViewBarSubMenu_.url}">${empty currViewBarSubMenu_ ? submenu.description : currViewBarSubMenu_.description}</a></h2>
		<div class="tool-bar">
			<div title="${menu.description} - ${empty currViewBarSubMenu_ ? submenu.description : currViewBarSubMenu_.description} - 导入${empty currViewBarSubMenu_ ? submenu.description : currViewBarSubMenu_.description}"  href="${ctx}/warehouse/stock/import" class="modal-window modal-link">导入仓储产品</div>
		</div>
		<form action="${ctx}/warehouse/inventoryrecord/waresearch" method="post" id="warehouseForm">
			<h2>仓储编号 :&nbsp;&nbsp; <a href="${ctx}/warehouse/inventoryrecord/out/${warehouse.id}/${inventoryRecord.product.id}/?beginDate=${beginDateString}&endDate=${endDateString}" >${warehouse.code }</a>&nbsp;-&nbsp;仓储名称 :&nbsp;&nbsp;<a href="${ctx}/warehouse/inventoryrecord/out/${warehouse.id}/${inventoryRecord.product.id}/?beginDate=${beginDateString}&endDate=${endDateString}" >${warehouse.name}</a></h2>
			
			<input type="hidden" name="warehouse.code" value="${warehouse.code }"/>
			<input type="hidden" name="warehouse.name" value="${warehouse.name }"/>
			<input type="hidden" name="beginDate" value='${beginDate}'/>
			<input type="hidden" name="endDate" value='${endDate}'/>
		</form>
		
		
		<div class="grid-list">
			<table class="grid" cellspacing="0"  url="${ctx}/warehouse/inventoryrecord/out/${warehouse.id}/${inventoryRecord.product.id}/?beginDate=${beginDateString}&endDate=${endDateString}">
				<thead>
					<tr>
						<td orderBy_="inventoryrecord.product.productCategory.categoryName" class="${orderParameters['inventoryrecord.product.productCategory.categoryName']}">产品类别</td>
						<td orderBy_="inventoryrecord.product.productNumber" class="${orderParameters['inventoryrecord.product.productNumber']}">产品编码</td>
						<td orderBy_="inventoryrecord.product.productName" class="${orderParameters['inventoryrecord.product.productName']}">产品名称</td>
						<td orderBy_="inventoryrecord.deliveryOrder.number" class="${orderParameters['inventoryrecord.deliveryOrder.number']}">DO编号</td>
						<td>ASC编号</td>
						<td>ASC名称</td>
						<td>数量 </td>
						<td>状态</td>
						<td orderBy_="inventoryrecord.operationDate" class="${orderParameters['inventoryrecord.operationDate']}">出入库时间</td>
					</tr>
				</thead>
				<tbody>
					<c:forEach var="inventoryRecord" items="${inventoryRecords}">
						<tr onmouseover="this.style.backgroundColor= '#A0CFEC'" onmouseout="this.style.backgroundColor= '#ffffff'"  ${inventoryRecord.total ? 'class="totalMsg"' : ''}>
								<td>${inventoryRecord.product.productCategory.categoryName } </td>
								<td>${inventoryRecord.product.productCode }</td>
								<td>${inventoryRecord.product.productName }</td>
								<td>
									<c:if test="${inventoryRecord.deliveryOrder != null }">
										<div class="info">
											<span>
												<a href="${ctx}/delivery/deliverydetails/${inventoryRecord.deliveryOrder.id}">	
													${inventoryRecord.deliveryOrder.number}
												</a>	
											</span>
										</div>
									</c:if>
									
								</td>
								<td>
									<c:if test="${inventoryRecord.deliveryOrder != null }">
										${inventoryRecord.deliveryOrder.maintenanceStation.number}
									</c:if>
								</td>
								<td>
									<c:if test="${inventoryRecord.deliveryOrder != null }">
										${inventoryRecord.deliveryOrder.maintenanceStation.name}
									</c:if>
								</td>
								<c:if test="${inventoryRecord.lastInventoryOperation=='OUT'}">
									<td class='errorMsg'>${inventoryRecord.amount }</td>
								</c:if>
								
								<c:if test="${inventoryRecord.lastInventoryOperation=='REPLENISHMENT'}">
									<td class='infoMsg'>${inventoryRecord.amount }</td>
								</c:if>
								
								<td>${inventoryRecord.inventoryOperationDislpaly }</td>
								<td>
									<fmt:formatDate value="${inventoryRecord.operationDate}" pattern="yyyy-MM-dd"/>
									
								</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
				
			<t:page action="${ctx}/warehouse/inventoryrecord/out/${warehouse.id}/${inventoryRecord.product.id}/?beginDate=${beginDateString}&endDate=${endDateString}" />
			
		</div>
	</div>
	
	<%@ include file="/include/script.jsp" %>
	
</body>

</html> 